package com.itheima.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.context.annotation.PropertySource;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * spring的配置文件，相当于applicationContext.xml
 */
@Configuration                          //本类是配置类
@ComponentScan("com.itheima")           //开启注解扫描
@Import({JdbcConfig.class, TransactionConfig.class})      //导入类
@PropertySource("dbconfig.properties")    //引用外部配置文件
@EnableTransactionManagement        //开启事务注解的支持
public class SpringConfig {

}
